#pragma once

#include "mbt/tracker_pwp.hh"

class SearchLine;
class BundleHist;

class WRBTracker : public RBTracker {
public:
	WRBTracker(const cv::Matx33f& K, std::vector<Object3D*>& objects);
	~WRBTracker();

protected:
	void RunIteration(std::vector<Object3D*>& objects, const std::vector<cv::Mat>& imagePyramid, int level);
	void ComputeJacobians(Object3D* object, const cv::Mat& frame, const cv::Mat& depth, const cv::Mat& depthInv, const cv::Mat& sdt, const cv::Mat& xyPos, const cv::Mat& w_map, const cv::Rect& roi, const cv::Mat& mask, int m_id, int level, cv::Matx66f& wJTJ, cv::Matx61f& JT);
	
	void ComputeWeightMap(const cv::Mat& frame, cv::Mat& mask_map, cv::Mat& xy_map, int oid);

	SearchLine* search_line;
	
};